
import java.io.*;
public class ReadExample {
    public static void main(String[] args) throws Exception {
        String s;
        BufferedReader r=new BufferedReader(new FileReader("src\\ReadExample.java"));
        BufferedWriter w=new BufferedWriter(new FileWriter("temp.text"));
        for (int i = 1;(s=r.readLine())!= null ; i++) {
            w.write(i+":"+s+"\n");
        }
        r.close();
        w.close();
    }

}
